import request from '@/utils/request'

// 查询发票列表
export function listInovice(query) {
  return request({
    url: '/TInvoice/TInvoice/list',
    method: 'get',
    params: query
  })
}

// 根据合同id查询发票
export function listInoviceByContract(query) {
  return request({
    url: '/TInvoice/TInvoice/contractlist/' + query.contractId,
    method: 'get',
    params: query
  })
}

// 查询发票详细
export function getInovice(id) {
  return request({
    url: '/TInvoice/TInvoice/' + id,
    method: 'get'
  })
}

// 新增发票
export function addInovice(data) {
  return request({
    url: '/TInvoice/TInvoice',
    method: 'post',
    data: data
  })
}

// 修改发票
export function updateInovice(data) {
  return request({
    url: '/TInvoice/TInvoice',
    method: 'put',
    data: data
  })
}

// 删除发票
export function delInovice(id) {
  return request({
    url: '/TInvoice/TInvoice/' + id,
    method: 'delete'
  })
}

// 合同下拉框
export function getContractList(query) {
  return request({
    url: '/TContractManagement/TContractManagement/contractoption',
    method: 'get',
    params: query
  })
}
// 产品工时
export function getproductList(query) {
  return request({
    url: '/erp/product/productList',
    method: 'get',
    params: query
  })
}




